<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: category_image.php 436 2014-01-19 11:49:02Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 436 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2014-01-19 11:49:02 +0000 (Sun, 19 Jan 2014) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

foreach(array('IMAGE', 'DROPDOWN', 'SLIDER') as $k) {

  if (defined('CATEGORY_'.$k.'_WIDTH') && defined('CATEGORY_'.$k.'_HEIGHT')) {
  
    $a = new image_manipulation(
      DIR_FS_CATALOG_IMAGES. 'categories_org/' . $categories_image_name,
      constant('CATEGORY_'.$k.'_WIDTH'), constant('CATEGORY_'.$k.'_HEIGHT'),
      DIR_FS_CATALOG_IMAGES. 'categories/'
        . (defined('CATEGORY_'.$k.'_PATH') ? constant('CATEGORY_'.$k.'_PATH').'/' : '')
        . $categories_image_name,
      IMAGE_QUALITY, '');
  
    $f = 'ELLIPSE';
    if (defined('CATEGORY_'.$k.'_'.$f) && constant('CATEGORY_'.$k.'_'.$f) != '') {
      $array=clear_string(constant('CATEGORY_'.$k.'_'.$f));
      $a->{strtolower($f)}($array[0]);
    }
  
    $f = 'MOTION_BLUR';
    if (defined('CATEGORY_'.$k.'_'.$f) && constant('CATEGORY_'.$k.'_'.$f) != '') {
      $array=clear_string(constant('CATEGORY_'.$k.'_'.$f));
      $a->{strtolower($f)}($array[0],$array[1]);
    }
  
    foreach(array('BEVEL', 'GREYSCALE', 'ROUND_EDGES', 'DROP_SHADOW') as $f) {
      if (defined('CATEGORY_'.$k.'_'.$f) && constant('CATEGORY_'.$k.'_'.$f) != '') {
        $array=clear_string(constant('CATEGORY_'.$k.'_'.$f));
        $a->{strtolower($f)}($array[0],$array[1],$array[2]);
      }
    }
  
    $f = 'FRAME';
    if (defined('CATEGORY_'.$k.'_'.$f) && constant('CATEGORY_'.$k.'_'.$f) != '') {
      $array=clear_string(constant('CATEGORY_'.$k.'_'.$f));
      $a->{strtolower($f)}($array[0],$array[1],$array[2],$array[3]);
    }
  
    $f = 'MERGE';
    if (defined('CATEGORY_'.$k.'_'.$f) && constant('CATEGORY_'.$k.'_'.$f) != '') {
      $array=clear_string(constant('CATEGORY_'.$k.'_'.$f));
      $a->{strtolower($f)}($array[0],$array[1],$array[2],$array[3],$array[4]);
    }
  
    $a->create();
  }
}
?>